<template>
	<div class="myintergralwrap">
		<div class="myintergralwrap-title">我的积分</div>
		<div class="myintergralwrap-text">
			<div>当前积分：<span>{{allsort}}</span></div>
			<table>
				<tr>
					<th>积分日期</th>
					<th>变动</th>
					<th>来源</th>
				</tr>
				<tr v-for="data in datas" :key="data.integralId">
					<td>{{data.sortdata}}</td>
					<td>{{data.sortchang}}</td>
					<td>{{data.sortwhere}}</td>
				</tr>
			</table>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return {
				datas:null,
				allsort:null,
			}
		},
		// created(){
		// 	var _this=this;
		// 	this.allsort=this.$store.state.userinfor.userintegral;
		// 	// window.console.log(this.$store.state.userinfor.userintegral)
		// 	// window.console.log(this.allsort)
		// 	var userphone=localStorage.getItem("userphone");
		// 	this.$axios.post("http://localhost:3000/userinfor/sort",{userphone:userphone})
		// 	.then(function(response){
		// 		var list=response.data;
		// 		if(list.code==200){
		// 			_this.datas=list.data
		// 		}
		// 	}).catch(function (error) {
		// 		window.console.log(error);
		// 	})
		// }
	}
</script>

<style>
	.myintergralwrap{
		width: 100%;
		border: 1px solid #c1c1c1;
	}
	.myintergralwrap-title{
		width: 100%;
		height: 60px;
		line-height: 60px;
		font-size: 18px;
		border-bottom: 1px solid #c1c1c1;
		text-indent: 3%;
		
	}
	.myintergralwrap-text{
		margin-bottom:90px ;
	}
	.myintergralwrap-text div{
		width: 100%;
		height: 60px;
		line-height: 60px;
		text-indent: 3%;
	}
	.myintergralwrap-text table{
		width: 94%;
		margin-left: 3%;
		text-align:center;
		border: 1px solid #c1c1c1;
		border-collapse:collapse;
		border-spacing:1;
		border-spacing:0;
	}
	.myintergralwrap-text tr{
		width: 100%;
		height: 46px;
		border-bottom: 1px solid #c1c1c1;
	}
	.myintergralwrap-text tr:nth-of-type(1){
		width: 100%;
		background: #c1c1c1;
	}
</style>
